package emun

const (
	AutonomousTypeAdd      = 1
	AutonomousTypeSub      = 2
	AutonomousTypeColorAdd = 3
	AutonomousTypeColorSub = 4
	//AutonomousTypeUSDTAdd  = 5
)

// 定义一个 map 来存储 UserEWalletType 及其对应的名称
var AutonomousTypeMap = map[int]string{
	AutonomousTypeAdd: "人工存款（加存款）",
	AutonomousTypeSub: "人工提款（减存款 金额使用负数）",
	//AutonomousTypeColorAdd: "彩金充值（加彩金）",
	//AutonomousTypeColorSub: "彩金扣除（减彩金 金额使用负数）",
	//AutonomousTypeUSDTAdd: "USDT充值",
}

type AutonomousValidMark int32

const (
	MagnificationAll   AutonomousValidMark = 1
	MagnificationTwo                       = 2
	MagnificationThree                     = 3
	MagnificationFive                      = 5
	MagnificationTen                       = 10
	MagnificationZero                      = 0
)

// 定义一个 map 来存储 UserEWalletType 及其对应的名称
var AutonomousValidMarkMap = map[AutonomousValidMark]string{
	MagnificationAll:   "全局打码量",
	MagnificationTwo:   "2倍", //打码量设置
	MagnificationThree: "3倍",
	MagnificationFive:  "5倍",
	MagnificationTen:   "10倍",
	MagnificationZero:  "0倍",
}

func GetAutonomousTypeByKey(key int) int {
	for k := range AutonomousTypeMap {
		if k == key {
			return k
		}
	}
	return 0 // 返回一个默认值
}

func GetAutonomousNameByType(eWalletType int) string {
	if name, ok := AutonomousTypeMap[eWalletType]; ok {
		return name
	}
	return "未知类型"
}

func AutonomousValidMarkMapByKey(key AutonomousValidMark) AutonomousValidMark {
	for k := range AutonomousValidMarkMap {
		if k == key {
			return k
		}
	}
	return 0 // 返回一个默认值
}
